-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Timed Transcripts Editor. #1111
Conversation
@wedaly All tests are passed locally, but on Jenkins I see corrupted gridfs messages. Can you help with this please? |
@auraz This error means there is a Mongo resource conflict, most likely with the contentstore database. You'll need to: (1) randomize the name of the Mongo database used as a contentstore, (2) drop and recreate the database before/after each test. See cms/djangoapps/contentstore/tests/test_contentstore.py for the correct way to do this. The important lines are:
and
Longer term, we're working on building an abstraction for this (much like we do with |
@wedaly thank you. |
@singingwolfboy @nedbat I'm going to be bugging you in person a bit later, but I wanted to remind you that this pull request exists. I know it is a monster, but..... It adds important functionality and only you can let this into the codebase |
|
||
|
||
@step('I run ipdb') | ||
def run_ipdb(_step): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to include a step like this in our codebase, it should probably be in common/djangoapps/terrain/steps.py
. Alternatively, we may just want to remove it entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved.
this.messenger | ||
.render('not_found') | ||
.showError( | ||
'No sources', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i18n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
showError method use gettext
inside.
@singingwolfboy , @nedbat All your comments are addressed, please continue. :) |
I'm all done reviewing. 👍 |
""") | ||
|
||
with self.assertRaises(transcripts_utils.TranscriptsGenerationException) as cm: | ||
transcripts_utils.generate_subs_from_source(youtube_subs, 'BAD_FORMAT', srt_filedata, self.course) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line seems indented strangely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent is fixed.
The only remaining issue that I'm concerned about is the nested |
👍 |
@@ -32,6 +32,11 @@ define(["backbone", "underscore", "js/models/metadata"], function(Backbone, _, M | |||
else if(model.getType() === MetadataModel.LIST_TYPE) { | |||
new Metadata.List(data); | |||
} | |||
else if(model.getType() === MetadataModel.VIDEO_LIST_TYPE) { | |||
var VideoList = require("js/views/transcripts/metadata_videolist"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add "js/views/transcripts/metadata_videolist"
to the list of modules in the define
call at the top of this file, and bind it to the VideoList
variable there. Is there a reason that you want to call require
here, instead of getting the module at the top of the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@singingwolfboy because I have circular dependencies (See, metadata_videolist.js:5 and metadata_videolist.js:39).
If I do so, it breaks a code. And I have fixed it according to Circular Dependencies and Sugar;
And it works okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, OK. I thought that you still needed to include the module name in the define
call at the top of the file, and you would just get passed a null value until you use require
inside the function to get the true value. But if this works, then I'm OK with it. (It would be nice if this code could be restructured to avoid the circular dependency, but I don't know if that's possible.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To do so Metadata.AbstractEditor
(that is stored in the js/views/metadata.js
now) should be moved to separate file. In this case, circular dependency will be avoided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that all? Can you do that in this pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@singingwolfboy Done. Please check 69e3978
Awesome. 👍 once the tests pass. |
YONK-997: api-integration version bump
This PR adds timed transcripts editor functionality for video player in studio.
Design wireframes for this PR is on wiki
Documentation of transcripts workflow is placed inside this PR to developers documentations folder.
Please navigate to sphinx generated developers documentation -> CMS->Transcripts
@Lyla, @frrrances, @singingwolfboy please review.
You can play with it on Blades sandbox at http://studio.sandbox-blades-001.m.edx.org/edit/i4x://private/05/vertical/f1d269cde2784fa99cd5e0f3a9604d62 .
Rollback functionality is not part of this PR.